package top.suven.base.util.constants;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @author Joven.wang
 * @version V1.0
 * @Title: BaseEnter.java
 * @date 2016年2月20日
 * @Description: TODO(说明)
 * 所有表对象类都必须继承该类;
 */

public abstract class BaseEntity implements Serializable {


    private long id; //表主键id;
    //	private long globalId; //全局id 用于分表分库使用
    private Date createDate; //创建时间;
    private Date modifyDate; //修改时间;

    public BaseEntity() {
        super();
        this.modifyDate = this.createDate = new Date();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public BaseEntity setCreateDate(Date createDate) {
        this.createDate = createDate;
        return this;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public BaseEntity setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
        return this;
    }
}
